import React , { Component } from 'react';
import { withRouter,NavLink,Switch,Redirect,Route} from 'react-router-dom';
import lazyLoad from './lazyLoad';

const Home = lazyLoad(() => import('./views/home'));
const Add = lazyLoad(() => import('./views/add'));
const Filter = lazyLoad(() => import('./views/filter'));
const Action = lazyLoad(() => import('./views/action'));
const NewAction = lazyLoad(() => import('./views/newaction'));
const AjaxPage = lazyLoad(() => import('./views/ajaxpage'));


const AxiosPage = lazyLoad(() => import('./views/axiospage'));


const Action2 = lazyLoad(() => import('./views/action2'));

const Pullload = lazyLoad(() => import('./views/pullload'));

const Web1904 = lazyLoad(() => import('./views/web1904'));




class App extends Component {
    render(){
        return (
            <Switch>
                <Route exact path="/" component={Home} />
                <Route path="/add" component={Add} />
                <Route path="/filter" component={Filter} />
                <Route path="/action" component={Action} />
                <Route path="/newaction" component={NewAction} />
                <Route path="/action2" component={Action2} />
                <Route path="/ajaxpage" component={AjaxPage} />
                <Route path="/axiospage" component={AxiosPage} />
                <Route path="/pullload" component={Pullload} />
                <Route path="/web1904" component={Web1904} />
                <Redirect to="/"/>
            </Switch>
        );
    }
}
export default App;
